#include <iostream>
#include <unistd.h>
#include "ClientTest.h"

#include "ServerTest.h"


int main(int argc,char* argv[])
{
    int o;
    int type = 0;
    const char * optstr = "c::s::";
    while((o = getopt(argc,argv,optstr)) != -1)
    {
        switch(o) 
        {
            case 's':
                type = 1;
                break;
            case 'c':
                type = 2;
                break;
            default:
                break;
        }
    }
    std::cout<<type<<"\tssss"<<std::endl;
    if(type == 2)
    {
        ClientTest test;
        test.Run("192.168.83.60",10086);
    }
    if(type == 1)
    {
        ServerTest test;
        test.Run("192.168.83.60",10010);
    }
    return 0;
}
